﻿
/**
* 命名空间: Game.TDBehaviorTree
*
* 功 能： 播放粒子行为
* 类 名： NodePlayParticle
*
* Ver 变更日期 负责人 变更内容
* ───────────────────────────────────
* V0.01 2019/12/13 15:02:37  
*/




using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;

namespace Game.TDBehaviorTree
{
    [System.Serializable]
    public class NodePlayParticle : NodeAction
    {
        [JsonProperty("parId")]
        public string m_ParId;

        public NodePlayParticle() : base(NodeType.Action)
        {
        }

        public override NodeResultType Execute()
        {
            UnityEngine.Debug.Log("播放粒子:" + m_ParId);
            return NodeResultType.Success;
        }

        public override void Draw(Rect m_Rect, GUIStyle style, NodeValue _value)
        {
            base.Draw(m_Rect, style, _value);
            GUILayout.Label("特效ID");
            m_ParId = UnityEditor.EditorGUILayout.TextField(m_ParId, UnityEngine.GUILayout.Width(100), UnityEngine.GUILayout.Height(20));
            _value.m_NodeArgs[0] = m_ParId;
        }

        public override void DeRializable(NodeValue _value)
        {
            base.DeRializable(_value);
            m_ParId = _value.m_NodeArgs[0];
        }
    }
}
